Again, big apologies if this is obvious, but I get the following error:
Error: type error: type error in operator application for `'-''. No matching operator found with left-hand side type `set of int' and right-hand side type `int'
The relevant snippets of code are (and I've indicated the line the error refers to):
int: k=4;
array[1..k] of var int: n;
array[2..k] of var int: n_inv;
array[2..k] of var int: p;
array[2..k] of var int: p_inv;
var int: y;
var int: N;
constraint p[2]=n[2];
constraint forall([p[j]=(p[j-1]*n[j]) mod N | j=3..k]); % it complains about this line
constraint p[k]*p_inv[k]+N*y=1;
constraint p_inv[k]>=1;
constraint p_inv[k]<=N-1;
constraint forall([n_inv[j]=(p_inv[j]*p[j-1]) mod N | j=k..3]);
constraint forall([p_inv[j-1]=(p_inv[j]*n[j]) mod N | j=k..3]);
constraint n_inv[2]=p_inv[2];
Any suggestions gratefully accepted :-)
Thanks
Andrew